﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MvcHtmlDemo.Models
{
    /// <summary>
    /// 产品数据模型
    /// </summary>
    public class ProductModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 产品类型Id
        /// </summary>
        [Required] 
        public int CateId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Required]
        public string Title { get; set; }

        /// <summary>
        /// 编号
        /// </summary>
        [Required]
        [MaxLength(10)]
        public string Code { get; set; }


        /// <summary>
        /// 状态
        /// </summary>
        [DefaultValue(0)]
        public int Status { get; set; }
        
        /// <summary>
        /// 注册日期
        /// </summary>
        public DateTime? RegDate { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }
}